Question: What is the ratio of the area of a square inscribed in a semicircle with radius $r$ to the area of a square inscribed in a circle with radius $r$? Express your answer as a common fraction.
Let $s_1$ be the side length of the square inscribed in the semicircle of radius $r$.  Applying the Pythagorean theorem to the right triangle shown in the diagram, we have $(s_1/2)^2+s_1^2=r^2$, which implies $s_1^2=\frac{4}{5}r^2$.  Let $s_2$ be the side length of the square inscribed in the circle of radius $r$.  Applying the Pythagorean theorem to the right triangle shown in the diagram, we have $(s_2/2)^2+(s_2/2)^2=r^2$, which implies $s_2^2=2r^2$.  Therefore, the ratio of  the areas of the two squares is $\dfrac{s_1^2}{s_2^2}=\dfrac{\frac{4}{5}r^2}{2r^2}=\boxed{\dfrac{2}{5}}$. [asy]
import olympiad;
import graph; size(200); dotfactor=3;
defaultpen(linewidth(0.8)+fontsize(10));
draw(Arc((0,0),1,0,180));
draw(dir(0)--dir(180));
real s=1/sqrt(5);
draw((s,0)--(s,2s)--(-s,2s)--(-s,0));
draw((0,0)--(s,2s),linetype("2 3"));
label("$r$",(s/2,s),unit((-2,1)));
draw(rightanglemark((0,0),(s,0),(s,2s),3.0));

picture pic1;

draw(pic1,Circle((0,0),1));
draw(pic1,(1/sqrt(2),1/sqrt(2))--(-1/sqrt(2),1/sqrt(2))--(-1/sqrt(2),-1/sqrt(2))--(1/sqrt(2),-1/sqrt(2))--cycle);
draw(pic1,(0,0)--(1/sqrt(2),1/sqrt(2)),linetype("2 3"));
label(pic1,"$r$",(1/sqrt(2),1/sqrt(2))/2,unit((-1,1)));
dot(pic1,(0,0));
draw(pic1,(0,0)--(1/sqrt(2),0));
draw(pic1,rightanglemark((0,0),(1/sqrt(2),0),(1/sqrt(2),1/sqrt(2)),3.0));

add(shift((2.5,0))*pic1);[/asy]